/**
 * Http请求类
 * @author zzhanglin
 * @param url 路径
 */
URLRequest = function( url )
{
	this.className="URLRequest";	
	this.data; //一个对象，它包含将随 URL 请求一起传输的数据
	this.method="get";
	this.url=url ;
	this.contentType = "application/x-www-form-urlencoded";
};
/**
 * 返回data中的内容
 */
URLRequest.prototype.getContent = function()
{
	if(this.data){
		return this.data.toString();
	}
	return "" ;
};
/**
 * URI编码格式路径
 */
URLRequest.prototype.toString = function()
{
	var temp = this.getContent();
	if(this.method==URLRequestMethod.POST){
		return encodeURI(temp); //Component
	}
	else 
	{
		if(temp.length>0 ){
			return this.url+encodeURI(temp);
		}
	}
	return "";
};